セクションの装飾 - SphinxのPDF出力カスタマイズ
code:preamble(latex)
\usepackage{titlesec}
\titleformat{\section}block {\normalfont\huge\bfseries} % format
{\clearpage\titlerule2pt\vspace{2pt}\thesection.} % label {0.5em} % sep
{\vspace{3pt}\huge} % before-code
[{\vspace{2pt}\titlerule2pt}] % after-code